import request from '@/utils/request'

// 查询任务奖励方式列表
export function listRewards(query) {
  return request({
    url: '/system/rewards/list',
    method: 'get',
    params: query
  })
}

// 查询任务奖励方式详细
export function getRewards(taskRewardId) {
  return request({
    url: '/system/rewards/' + taskRewardId,
    method: 'get'
  })
}

// 新增任务奖励方式
export function addRewards(data) {
  return request({
    url: '/system/rewards',
    method: 'post',
    data: data
  })
}

// 修改任务奖励方式
export function updateRewards(data) {
  return request({
    url: '/system/rewards',
    method: 'put',
    data: data
  })
}

// 删除任务奖励方式
export function delRewards(taskRewardId) {
  return request({
    url: '/system/rewards/' + taskRewardId,
    method: 'delete'
  })
}
